<?php

class test
{
	public $TEST = 1;

	public  $data = array();

	public function __set($x, $y)
	{
		$this->data[$x] = $y;
	}

	public function __get($x)
	{
		return $this->data[$x];
	}
}

$pdo = new PDO('mysql:dbname=x10_test;host=localhost', 'x10', 'x10');
$stmt = $pdo->prepare('select * from `numbers`');
$stmt->setFetchMode(PDO::FETCH_CLASS, 'test', array());
$stmt->execute();
var_dump($stmt->fetchAll());

?>
